package farmacia.gui.frenteLoja;

import java.awt.BorderLayout;
import java.awt.EventQueue;

import javax.swing.JFrame;
import javax.swing.JPanel;
import javax.swing.border.EmptyBorder;
import javax.swing.JTextPane;
import javax.swing.JEditorPane;
import java.awt.Panel;
import java.awt.Button;
import javax.swing.JButton;
import javax.swing.border.BevelBorder;
import java.awt.FlowLayout;
import javax.swing.border.EtchedBorder;
import javax.swing.JTextField;
import javax.swing.JLabel;
import javax.swing.JPasswordField;
import java.awt.Color;
import java.text.ParseException;

import javax.swing.border.TitledBorder;
import javax.swing.text.MaskFormatter;
import javax.swing.UIManager;
import javax.swing.JTable;
import javax.swing.JTree;
import com.jgoodies.forms.factories.DefaultComponentFactory;
import javax.swing.JFormattedTextField;
import javax.swing.JComboBox;

public class JfVendedor extends JFrame {

	private JPanel contentPane;
	private JTextField textField;
	private JTextField textField_1;
	private JTextField textField_2;
	private JTextField textField_3;
	private JPasswordField passwordField;
	private JPasswordField passwordField_1;
	private JTextField textField_5;
	private JTextField textField_6;
	private JTextField textField_7;
	private JTable table;
	JFormattedTextField frCPF;

	/**
	 * Launch the application.
	 */
	public static void main(String[] args) {
		EventQueue.invokeLater(new Runnable() {
			public void run() {
				try {
					JfVendedor frame = new JfVendedor();
					frame.setVisible(true);
				} catch (Exception e) {
					e.printStackTrace();
				}
			}
		});
	}

	/**
	 * Create the frame.
	 * @throws ParseException 
	 */
	public JfVendedor() throws ParseException {
		setTitle("Cadastro de Vendedores");
		setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
		setBounds(100, 100, 790, 500);
		contentPane = new JPanel();
		contentPane.setBorder(new EmptyBorder(5, 5, 5, 5));
		contentPane.setLayout(new BorderLayout(0, 0));
		setContentPane(contentPane);
		
		Panel panel = new Panel();
		contentPane.add(panel, BorderLayout.CENTER);
		panel.setLayout(null);
		
		JButton btnNovo = new JButton("Novo");
		btnNovo.setBounds(12, 326, 117, 24);
		panel.add(btnNovo);
		
		JButton btnAlterar = new JButton("Alterar");
		btnAlterar.setBounds(173, 326, 117, 24);
		panel.add(btnAlterar);
		
		JButton btnCancelar = new JButton("Cancelar");
		btnCancelar.setBounds(333, 326, 117, 24);
		panel.add(btnCancelar);
		
		JButton btnSalvar = new JButton("Salvar");
		btnSalvar.setBounds(481, 326, 117, 24);
		panel.add(btnSalvar);
		
		JButton btnExcluir = new JButton("Excluir");
		btnExcluir.setBounds(643, 326, 117, 24);
		panel.add(btnExcluir);
		
		JPanel panel_1 = new JPanel();
		panel_1.setBorder(new EtchedBorder(EtchedBorder.RAISED, null, null));
		panel_1.setBounds(12, 12, 318, 62);
		panel.add(panel_1);
		panel_1.setLayout(null);
		
		textField = new JTextField();
		textField.setEditable(false);
		textField.setBounds(85, 12, 63, 18);
		panel_1.add(textField);
		textField.setColumns(10);
		
		JLabel lblCodigo = new JLabel("Codigo");
		lblCodigo.setBounds(12, 14, 70, 14);
		panel_1.add(lblCodigo);
		
		JLabel lblNome = new JLabel("Nome");
		lblNome.setBounds(12, 40, 70, 14);
		panel_1.add(lblNome);
		
		textField_1 = new JTextField();
		textField_1.setBounds(95, 38, 211, 18);
		panel_1.add(textField_1);
		textField_1.setColumns(10);
		
		JPanel panel_2 = new JPanel();
		panel_2.setBorder(new EtchedBorder(EtchedBorder.RAISED, null, null));
		panel_2.setBounds(12, 86, 318, 219);
		panel.add(panel_2);
		panel_2.setLayout(null);
		
		JLabel lblEndereco = new JLabel("Endereco");
		lblEndereco.setBounds(12, 12, 70, 14);
		panel_2.add(lblEndereco);
		
		textField_2 = new JTextField();
		textField_2.setBounds(12, 29, 294, 18);
		panel_2.add(textField_2);
		textField_2.setColumns(10);
		
		JLabel lblCompDend = new JLabel("Comp. End");
		lblCompDend.setBounds(12, 51, 80, 14);
		panel_2.add(lblCompDend);
		
		textField_7 = new JTextField();
		textField_7.setBounds(12, 69, 210, 18);
		panel_2.add(textField_7);
		textField_7.setColumns(10);
		
		JLabel lblCep = new JLabel("CEP");
		lblCep.setBounds(226, 51, 70, 14);
		panel_2.add(lblCep);
		
		JLabel lblNewLabel_1 = new JLabel("Cidade");
		lblNewLabel_1.setBounds(74, 88, 70, 14);
		panel_2.add(lblNewLabel_1);
		
		JFormattedTextField tfCpf = new JFormattedTextField(new MaskFormatter("##.###-###"));
		tfCpf.setBounds(226, 69, 80, 18);
		panel_2.add(tfCpf);
		
		JComboBox comboBox = new JComboBox();
		comboBox.setBounds(12, 107, 50, 23);
		panel_2.add(comboBox);
		
		JLabel lblEstado = new JLabel("Estado");
		lblEstado.setBounds(12, 88, 70, 14);
		panel_2.add(lblEstado);
		
		JComboBox comboBox_1 = new JComboBox();
		comboBox_1.setBounds(74, 107, 170, 23);
		panel_2.add(comboBox_1);
		
		JPanel panel_3 = new JPanel();
		panel_3.setBorder(new EtchedBorder(EtchedBorder.RAISED, null, null));
		panel_3.setBounds(342, 12, 418, 293);
		panel.add(panel_3);
		panel_3.setLayout(null);
		
		JPanel panel_4 = new JPanel();
		panel_4.setBorder(UIManager.getBorder("TextField.border"));
		panel_4.setBounds(174, 12, 232, 130);
		panel_3.add(panel_4);
		panel_4.setLayout(null);
		
		JLabel lblUsuario = new JLabel("Usuario");
		lblUsuario.setBounds(12, 12, 70, 14);
		panel_4.add(lblUsuario);
		
		JLabel lblSenha = new JLabel("Senha");
		lblSenha.setBounds(12, 50, 70, 14);
		panel_4.add(lblSenha);
		
		JLabel lblConfirma = new JLabel("Confirma");
		lblConfirma.setBounds(12, 80, 70, 14);
		panel_4.add(lblConfirma);
		
		textField_3 = new JTextField();
		textField_3.setBounds(86, 10, 134, 18);
		panel_4.add(textField_3);
		textField_3.setColumns(10);
		
		passwordField = new JPasswordField();
		passwordField.setBounds(86, 78, 134, 18);
		panel_4.add(passwordField);
		
		passwordField_1 = new JPasswordField();
		passwordField_1.setBounds(86, 48, 134, 18);
		panel_4.add(passwordField_1);
		
		JLabel lblCpf = new JLabel("CPF");
		lblCpf.setBounds(12, 166, 70, 14);
		panel_3.add(lblCpf);
		
		textField_5 = new JTextField();
		textField_5.setBounds(87, 194, 114, 18);
		panel_3.add(textField_5);
		textField_5.setColumns(10);
		
		JLabel lblRg = new JLabel("RG");
		lblRg.setBounds(12, 196, 70, 14);
		panel_3.add(lblRg);
		
		JLabel lblPesquisaNome = new JLabel("Pesquisa Nome");
		lblPesquisaNome.setBounds(12, 252, 127, 14);
		panel_3.add(lblPesquisaNome);
		
		textField_6 = new JTextField();
		textField_6.setBounds(134, 250, 272, 18);
		panel_3.add(textField_6);
		textField_6.setColumns(10);
		
		JLabel lblNewLabel = new JLabel("");
		lblNewLabel.setBounds(12, 12, 106, 115);
		panel_3.add(lblNewLabel);
		
		frCPF = new JFormattedTextField(new MaskFormatter("###.###.###-##"));
		frCPF.setBounds(87, 164, 106, 18);
		panel_3.add(frCPF);
		
		table = new JTable();
		table.setBounds(12, 364, 748, 86);
		panel.add(table);
	}
}
